package com.k2091.washcar.controller;


import com.k2091.washcar.entity.Examine;
import com.k2091.washcar.entity.FormInline;
import com.k2091.washcar.service.IExamineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2021-06-02
 */
@RestController
@RequestMapping("/api/examine")
public class ExamineController {

    @Autowired
    private IExamineService examineService;


    @RequestMapping("/getExamine")
    public List<Examine> getExamineById(Long id){
        return examineService.selectExamineById(id);
    }

    @RequestMapping("/insertExamine")
    public int insertExamine(@RequestBody Examine examine){
        int d=examineService.insertExamine(examine);
        return d;
    }
    @RequestMapping("/selectExamine")
    public List<Examine> selectExamineByAll(){
        FormInline formInline = new FormInline();
        return  examineService.selectExamineByAll(formInline);
    }
}
